<html>
<meta charset="UTF-8"/>
<script>

var soapxml = '<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header/><soap-env:Body><n0:SocialMediaActivityBundleMaintainConfirmationsync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:QXL:/1SAI/TAE2C89B62935E25D62C8AE:804"><SocialMediaActivity><UUID>00163e0b-d0a3-1ee7-bac1-0812dcf198e2</UUID><ID>59226</ID><ChangeStateID>                 20171226064442.5352610</ChangeStateID></SocialMediaActivity></n0:SocialMediaActivityBundleMaintainConfirmationsync></soap-env:Body></soap-env:Envelope>';

var soapreg = /.*<ID>(.*)<\/ID>.*/;
var soapresult = soapreg.exec(soapxml);

var response2 = '<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">' + '<soap-env:Header/><soap-env:Body>' + 
'n0:SocialMediaUserProfileBundleMaintainConfirmation_sync xmlns:n0="http://sap.' + 
'com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:QXL:/1SAI/TAE380CF5298475959BCE4F:804"' + '><SocialMediaUserProfile><ID>6071</ID><UUID>00163e0b-d0a3-1ee7-bac1-a07e3c3d9ba0</UUID' + '><ChangeStateID>20171226071848.2066790</ChangeStateID></SocialMediaUserProfile>' + 
        '</n0:SocialMediaUserProfileBundleMaintainConfirmation_sync></soap-env:Body></soap-env:Envelope>';

var soapreg2 = /.*<ID>(.*)<\/ID>.*<UUID>(.*)<\/UUID>.*/;

var soapresult2 = soapreg2.exec(response2);

var link = "<https://api.github.com/repositories/80901824/issues?page=2>; rel=\"next\", <https://api.github.com/repositories/80901824/issues?page=98>; rel=\"last\"";

var linkmatch = /<(.*)>.*<(.*)>.*/;

var result = linkmatch.exec(link);

var urlForNextPage = result[1];

var urlForLastPage = result[2];

console.log(urlForNextPage);
console.log(urlForLastPage);

// https://api.github.com/repositories/80901824/issues?page=98
var lastMatch = /.*=(.+)/;

var lastPage = lastMatch.exec(urlForLastPage);
var lastPageNumber = lastPage[1];
debugger;

var  regexp = /aabb/g; //g可省
// var  regexp = new Regexp("xyz","g"); //第二个参数可省 syntax error!!
var str = "_a_x_x";
var reg = /_(x)_(x)/;
var result = reg.exec(str);

var wechat = "<![CDATA[你好]]>";
var wechat = wechat.toString("utf-8");
var reg = /<!\[CDATA\[(.*)\]\]>/;
var result = reg.exec(wechat);
alert(result[0]);
alert(result[1]);

var aa = "{\"code\":100000,\"text\":\"明日复明日，明日何其多！既然这么多，不妨再拖拖\"}";
var bb = JSON.parse(aa);

debugger;

var number = /^[0-9]+\.{0,1}[0-9]{0,2}$/;
console.log( number.test("3435"));
console.log( number.test("3435.34"));
console.log( number.test("3435a"));

var location2 = {
	href: "http://www.baidu.com/?a=1&b=2"
}
var m = location2.href.match(/(\w+:)\/{0,3}([^\/]+)(?:(\/[^\?#]*))?(?:(\?[^#]+|.+))?(?:(#.*))?/);
var res = {
    protocol: m[1],
    host: m[2],
    path: m[3],
    search: m[4],
    hash: m[5]
};
console.log(res);
debugger;
</script>
</html>